package com.hit.demo1.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;


@Controller //可以请求的接口
@RestController //前后台分离
public class HitController {
    /** 你好字符串拼接
     *
     * @param name
     * @return
     */
    @GetMapping("/hello2")//请求方法名是不可重复的
    @ResponseBody
    public String strAdd(String name){
        return "hello "+name;
    }
}
